<?php if(!defined('ROOT_PATH')) exit('Access Denied');?><div class="box box-middle">
  <div class="box-title">
    <h3>页面编辑</h3>
    <span></span> </div>
  <div class="box-content">
    <form action="/admin.php/Admin_Pages/edit/" method="post" name="add_post" id="add-post">
      <div id="add-post">
        <ul id="add-post-option">
          <li>
            <label for="add-post-title" class="add-post-label">标题：</label>
            <input type="text" id="add-post-title" name="title" value="<?php echo $pagesdata["title"];?>" class="add-post-text" />
          </li>
                       <li>
            <label  class="add-post-label">关键字：</label>
            <textarea  class="add-post-textarea" name="keywords"  autocomplete="off"><?php echo $pagesdata["keywords"];?></textarea>
          </li>
           <li>
            <label  class="add-post-label">描述：</label>
            <textarea class="add-post-textarea" name="description"  autocomplete="off"><?php echo $pagesdata["description"];?></textarea>
          </li>
          <li>
           <label for="add-post-tags" class="add-post-label">内容：</label>
           <div id="contentcen-sapn">
           <textarea id="contentcen" name="contentcen" style="width:800px;height:400px; display:inline-block;"><?php echo $pagesdata["content"];?></textarea></div>
            </li>

          <label for="add-post-tags" class="add-post-label"></label>
          <input type="hidden" name="cid" value="<?php echo $pagesdata["id"];?>" />
          <input type="submit" id="edit-post-submit" name="edit-post-submit" value="编辑页面" />
          </li>
        </ul>
      </div>
    </form> 
  </div>
</div>
<script>
KindEditor.create('#contentcen', {
minWidth : 800,
minHeight : 400,
allowFileManager : true
});
$('#add-post').ajaxForm({
beforeSubmit: function(){	
$("#edit-post-submit").attr('disabled',true);
},
success: function(data){
if(data=='ok!') {
showMessage('修改成功！','tips');
$("#edit-post-submit").attr('disabled',false);
ajaxLoad('/admin.php/Admin_Pages/Main/pages/2');
} else {
showMessage(data,'error');
}
}});

</script>